home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
L' Effet Pommier 3
/
L'Effet Pommier - Volume 03.iso
/
Programmation
/
Gooey1.3.1
/
C++ Templates
/
ModalDialog.c
< prev
next >
Wrap
Text File
|
1993-12-29
|
4KB
|
167 lines
$$Loop ModalDialogs
$$Message User Modal Dialog, u:$Worksheet.name$.cp
$$File u:$Worksheet.name$.cp
/* $Worksheet.name$ Handle this dialog */
/* $CopyRight$ */
/* File name: $Worksheet.name$
Function: Handle this modal dialog.
This dialog is called when:
History: $Date$ Original by $Author$
*/
#include "mmCommon$Prototype.name$.h" /* Common */
#include "Common$Prototype.name$.h" /* Common */
/* ======================================================= */
/* ======================================================= */
void CD$Worksheet.name$::Init()
{
inherited::Init();
}
$$if Option.EXTRAHOOKS
/* ======================================================= */
void CD$Worksheet.name$::ExtraSetup()
{
inherited::ExtraSetup();
}
/* ======================================================= */
/* Let user handle the item hit */
void CD$Worksheet.name$::DoItemHit(short *itemHit,Boolean *ExitDialog)
{
Rect tempRect; /* Temporary rectangle */
short DType; /* Type of dialog item */
Handle DItem; /* Handle to the dialog item */
ControlHandle CItem; /* Control handle */
short temp; /* Get selection, temp holding */
inherited::DoItemHit(itemHit,ExitDialog);
/* NOTE: Set *itemHit = 0; if you want to handle it and not the return code */
/* NOTE: Set *ExitDialog = true; if you want to exit the dialog. */
if (*itemHit > 0)
{
GetDItem(this->theWindow,*itemHit,&DType,&DItem,&tempRect); /* Get item information */
CItem = (ControlHandle)DItem; /* Get the control handle */
$$Loop Control.type = Button
if (*itemHit == ResD_$Control.name$) /* Handle the Button being pressed */
{
}
$$EndLoop Control.type
$$Loop Control.type = Checkbox
if (*itemHit == ResD_$Control.name$) /* Handle the checkbox being pressed */
{
/* Checkbox has NOT been toggled by this call, that happens when it returns */
if (this->Value_$Control.name$ == 0)
{
}
else
{
}
}
$$EndLoop Control.type
$$Loop Control.type = UButton
if (*itemHit == ResD_$Control.name$) /* Handle the Button being pressed */
{
}
$$EndLoop Control.type
$$Loop Control.type = UToggle
if (*itemHit == ResD_$Control.name$) /* Handle the checkbox being pressed */
{
/* Checkbox has NOT been toggled by this call, that happens when it returns */
if (this->Value_$Control.name$ == 0)
{
}
else
{
}
}
$$EndLoop Control.type
$$Loop Control.type = Radio
if (*itemHit == ResD_$Control.name$) /* Handle the Radio being pressed */
{
/* Radio has NOT been set by this call, that happens when it returns */
}
$$EndLoop Control.type
$$Loop Control.type = HotRect
$$if Control.HotSpot
if (*itemHit == ResD_$Control.name$) /* Handle the HotSpot being pressed */
{
}
$$endif Control.HotSpot
$$EndLoop
$$Loop Control.type = Picture
$$if Control.NonGraphic
if (*itemHit == ResD_$Control.name$) /* Handle the Picture being pressed */
{
}
$$endif Control.NonGraphic
$$EndLoop
$$Loop Control.type = Icon
$$if Control.NonGraphic
if (*itemHit == ResD_$Control.name$) /* Handle the Icon being pressed */
{
}
$$endif Control.NonGraphic
$$EndLoop
$$Loop Control.type = Sicn
$$if Control.NonGraphic
if (*itemHit == ResD_$Control.name$) /* Handle the Sicn being pressed */
{
}
$$endif Control.NonGraphic
$$EndLoop
}
}
/* ======================================================= */
/* Exit the dialog, get Edit Text values and other settings at this time */
void CD$Worksheet.name$::Exit()
{
inherited::Exit();
}
/* ======================================================= */
/* Update the Dialog */
void CD$Worksheet.name$::Refresh()
{
inherited::Refresh();
}
$$endif Option.EXTRAHOOKS
/* ======================================================= */
/* ======================================================= */
$$CloseFile
$$EndLoop